﻿<Window x:Class="ShortcutReader.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Shortcut Editor"   
        Width="814" 
        ResizeMode="NoResize" 
        WindowStartupLocation="CenterScreen" 
        SizeToContent="Height"
        Icon="/ShortcutReader;component/Images/Shortcut.ico" 
        Loaded="Window_Loaded">
    <Window.Resources>
        <Style TargetType="Label">
            <Setter Property="Width" Value="90"/>
            <Setter Property="HorizontalContentAlignment" Value="Right"/>
        </Style>
    </Window.Resources>
    <Window.InputBindings>
        <KeyBinding Key="S" 
                    Modifiers="Control"
                    Command="{Binding SaveShortcutCommand}"/>
    </Window.InputBindings>
    <StackPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="100"/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Vertical">
                <DockPanel LastChildFill="True">
                    <Label Content="Path:"/>
                    <TextBox Margin="5"
                         Text="{Binding TargetPath}"/>
                </DockPanel>
                <DockPanel LastChildFill="True">
                    <Label Content="Args:"/>
                    <TextBox Margin="5"
                         Text="{Binding Arguments}"/>
                </DockPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Content="Open" 
                            Width="90" 
                            HorizontalAlignment="Right"
                            VerticalAlignment="Bottom" 
                            Margin="5" Click="Click_Open" 
                            Name="Btn_Open"/>
                    <Button Content="Save"
                            Width="90" 
                            HorizontalAlignment="Right" 
                            VerticalAlignment="Bottom"
                            Margin="5" 
                            Command="{Binding SaveShortcutCommand}" />
                </StackPanel>
            </StackPanel>
            <StackPanel AllowDrop="True"
                    Grid.Column="1"
                    Drop="Window_Drop">
                <Image Source="/ShortcutReader;component/Images/Load.png" 
                   Stretch="None" 
                   Margin="10" />
                <TextBlock Text="Drop shortcut here..." 
                       TextWrapping="WrapWithOverflow"
                       TextAlignment="Center" />
            </StackPanel>

        </Grid>
        <StatusBar>
            <StatusBarItem Content="{Binding StatusLog}"/>
        </StatusBar>
    </StackPanel>
</Window>
